Shader "Level4/UV/UVPan" {
	Properties {
		_MainTex ("Base (RGB)", 2D) = "white" {}
		_Speed("ScrollSpeed,used(x,y)",vector) = (1,0,0,0)
	}
	
	CGINCLUDE
		#include "UnityCG.cginc"
		
		sampler2D _MainTex;
		float4 _Speed;
		
		struct v2f{
			float4 pos:POSITION;
			float2 uv:TEXCOORD;
		};
		
		v2f vert(appdata_full p){
			v2f v;
			v.pos = mul(UNITY_MATRIX_MVP,p.vertex);
			v.uv = p.texcoord.xy + _Time.yy * _Speed.xy;
			return v;
		}
		
		float4 frag(v2f v):COLOR{
			float4 c;
			c = tex2D(_MainTex,v.uv);
			return c;
		}
		
	ENDCG
	
	SubShader {
		Pass{
			CGPROGRAM
				#pragma vertex vert
				#pragma fragment frag
			ENDCG
		}
	} 
	FallBack "Diffuse"
}
